/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年1月6日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package proxy.dynamicProxy.java;

import java.lang.reflect.Proxy;

/**
 * @Type DO
 * @Desc
 * @author 52489
 * @date 2019年1月6日
 * @Version V1.0
 */
public class DO {

    public static void main(String[] args) {
        System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");
        Star star = new RealStar();
        StarHandler handler = new StarHandler(star);
        Star proxy = (Star) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[] { Star.class },
                handler);
        proxy.sing();

    }

}
